/*
 * @Date: 2024-08-01 15:45:51
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-02-18 13:37:33
 * @Description: ace编辑器自动提示配置
 */

/**
 * 属性说明
 * 
 * meta: 元标识，标识该API是用于哪里
 * caption: API的提示内容
 * value: API被选中后回显的值
 * score: 级别数字越大，权重越高
 */
export const aceAutoTips = []
export const completions = [
  {
    type: 'hpWidget',
    meta: 'HpWdiget API',
    score: 2,
    captions: [
      { value: 'loadData' },
      { value: 'reloadData' },
    ]
  },
  {
    type: 'busiConfig',
    meta: 'BusiConfig API',
    score: 2,
    captions: [
      { value: 'getUserInfo' },
      { value: 'getBjAdCode' },
      { value: 'getBusiConfig' },
      { value: 'getCurrentYear' },
    ]
  },
  {
    type: 'homepage',
    meta: 'HomoPage API',
    score: 3,
    captions: [
      { value: 'route' },
      { value: 'router' },
      { value: 'routes' },
      { value: 'getPanelRef' },
      { value: 'pluginManager' }
    ]
  },
]
for (let item of completions) {
  for (let capItem of item.captions) {
    aceAutoTips.push({
      meta: item.meta,
      score: item.score,
      value: `${capItem.value}()`,
      caption: capItem.value
    })
  }
}
